package handlers;

import map.Direction;
import map.GameWorld;
import entity.Entity;

public class RiverHandler {
	
	private GameWorld world;
	private Entity entity;
	private Direction dir;
	
	public RiverHandler(Entity entity, Direction dir) {
		this.world = GameWorld.getInstance();
		this.entity = entity;
		this.dir = dir;
	}
	
	public void push() {
		world.getCurrentMap().removeEntity(entity.getPosition());
		this.entity.move(dir);
		world.getCurrentMap().addEntity(entity, entity.getPosition());
		world.getCurrentMap().updateEntity(entity, entity.getPosition());
	}
}
